package cn.usersmsg.model;

import java.util.Date;

/**
 * 用户实体类
 * @author Administrator
 *
 */
public class User {
	private int user_id; //用户ID
	private String user_name;//用户名
	private String user_pwd;//用户密码
	private Date user_date;//用户上次登陆时间
	private int user_identity; // 用户身份信息   0用户 1管理员
	
	//get set方法
	public int getUser_id() {
		return user_id;
	}

	public void setUser_id(int user_id) {
		this.user_id = user_id;
	}

	public String getUser_name() {
		return user_name;
	}

	public void setUser_name(String user_name) {
		this.user_name = user_name;
	}

	public String getUser_pwd() {
		return user_pwd;
	}

	public void setUser_pwd(String user_pwd) {
		this.user_pwd = user_pwd;
	}

	public Date getUser_date() {
		return user_date;
	}

	public void setUser_date(Date user_date) {
		this.user_date = user_date;
	}

	public int getUser_identity() {
		return user_identity;
	}

	public void setUser_identity(int user_identity) {
		this.user_identity = user_identity;
	}
	
	//构造方法
	public User() {
	}

	public User(int user_id, String user_name, String user_pwd,
			Date user_date, int user_identity) {
		super();
		this.user_id = user_id;
		this.user_name = user_name;
		this.user_pwd = user_pwd;
		this.user_date = user_date;
		this.user_identity = user_identity;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((user_name == null) ? 0 : user_name.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		User other = (User) obj;
		if (user_name == null) {
			if (other.user_name != null)
				return false;
		} else if (!user_name.equals(other.user_name))
			return false;
		return true;
	}
	
}